#include <stdio.h>
int main(){
	int x,a,b;
	scanf("%d",&x);
	a = x/10;
	b = x%10;
	printf("%d\n%d",a,b);
} 
